<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
  </style>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/jquery" charset="utf-8"></script>
<script src="https://www.layuicdn.com/layui/layui.js" charset="utf-8"></script>
<script src="/js/addressSelect.js" charset="utf-8"></script>
<script src="/js/echarts.js"></script>
<script>
    payDiamond(648);

    function payDiamond(number) {
        let amount=number
        $.ajax({
            url: '/payment/pay',
            method: 'POST',
            contentType: 'application/json',
            data:JSON.stringify({
                userId:sessionStorage.getItem('userId'),
                amount:amount
            }),
            success:function (res) {
                layer.msg('正在跳转到支付页面······'+res.data)
            }
        })
    }
</script>
</body>
<script>

</script>
</html>